begintownscript;
variables;
short choice,i;

body;
beginstate init_state;
i = 0;
while(char_ok(i) == 0){
	i = i + 1;
}
relocate_character(i,23,46);
force_view_center(23,46);
force_instant_terrain_redraw();
if(get_flag(5,5) > 0){
	erase_char(6);
	if(get_flag(4,2) == 0){
		relocate_character(i,22,30);
		force_view_center(22,30);
		force_instant_terrain_redraw();
		reset_dialog();
		add_dialog_str(0,"I came storming out of the Sanctum. That beggar was still there, though his fellow had left. He had the nerve to stay there looting the place even when he knew I was there.",0);
		add_dialog_str(1,"He'd dragged out the barrels of food and wine that the Order had stored up. Whatever they didn't give they stored so they could give it later.",0);
		add_dialog_str(2,"That's how they did things-- if you don't need it now you'll sure as hell need it later, because things aren't getting better.",0);
		add_dialog_choice(0,"OK");
		choice = run_dialog(1);
		message_dialog("The food could have rotted or stewed in a beggar's stomach, I didn't care either way. It was the star that had gotten to me.","");
		set_flag(4,2,1);
	}
}
if(get_flag(7,0) > 0){
	set_ticks_forward(4100 - get_current_tick());
	relocate_character(i,23,39);
	force_view_center(23,39);
	force_instant_terrain_redraw();
	erase_char(7);
	message_dialog("The beggar had departed with his spoils. Night had fallen and the Chapel was empty again. It crossed my mind that it would be like this forever now that there was no more Order.","");
}
break;

beginstate exit_state;
break;

beginstate start_state;

break;

beginstate 10;
if(get_flag(4,0) == 0){
	block_entry(1);
	set_flag(4,0,1);
	message_dialog("_The roof had caught fire-- I could see from afar. As I drew closer though, I could see just how bad it was. The entire Chapel was roofless except the inner sanctum._","_Most frightening, though, was that none of the Chapel's occupants were standing outside. I almost laid down and sobbed right there, but as I approached the scorched doors I heard the sound of voices from within, causing my spirits to soar.");
	set_character_facing(i,0);
	relocate_character(i,23,45);
	force_view_center(23,45);
	force_instant_terrain_Redraw();
	pause(2);

	relocate_character(i,23,44);
	force_view_center(23,44);
	force_instant_terrain_Redraw();
	pause(2);

	relocate_character(i,23,43);
	force_view_center(23,43);
	force_instant_terrain_Redraw();
	pause(2);

	relocate_character(i,23,42);
	force_view_center(23,42);
	force_instant_terrain_Redraw();
	pause(2);

	relocate_character(i,23,41);
	force_view_center(23,41);
	force_instant_terrain_Redraw();
	pause(2);

	relocate_character(i,23,40);
	force_view_center(23,40);
	force_instant_terrain_Redraw();
	pause(2);

	relocate_character(i,23,39);
	force_view_center(23,39);
	force_instant_terrain_Redraw();
	pause(2);

	text_bubble_on_char(i,"!");
	force_instant_terrain_Redraw();
	pause(5);

	message_dialog("I hurtled through the door, but came to a screeching halt as I crossed the threshold. Two men picked over the rubble of the collapsed roof, but neither of them were monks.","At first I took them to be some of the poor souls the Order takes in, but was still panicked about not seeing Father Kay or the others anywhere.");
	message_dialog("I asked them what happened-- where everyone was. I think I must have shouted at them, I don't rightly remember, I was really distressed.","Oh god...");
	message_dialog("When they saw me they bolted, each of them shouting and scrambling towards a different exit. I leaped forward to grab one of them by the collar.","");
	relocate_character(i,20,33);
	force_view_center(20,33);
	set_character_facing(i,2);
	force_instant_Terrain_redraw();
 	begin_talk_mode(1);
}

break;

beginstate 11;
if(get_flag(4,1) == 0){
	set_flag(4,1,1);
	set_character_facing(i,0);
	message_dialog("Those next few hours were the hardest of my life.","");
	move_to_new_town(5,24,25);
}
break;

beginstate 12;
block_entry(1);
if(get_flag(7,0) > 0)
	move_to_new_town(5,24,41);
message_dialog("No, I'd already done my mourning. I was going to find that emblem-- that'd set it all right.","");
break;

beginstate 13;
block_entry(1);
message_dialog("I'd already seen all of the wreckage that I ever wanted to see. There was nothing else for me to search the rest of the Chapel for.","");
break;

beginstate 14;
if(get_flag(7,0) > 0){
	block_entry(1);
	message_dialog("I had to return the emblem to its proper place. That would set everything right.","");
	end();
}
if(get_flag(4,3) == 0){
	block_entry(1);
	message_dialog("I was hot to go hunting whoever was responsible for taking the emblem and destroying the Chapel, but I didn't even have a name of a suspect.","");
}
else{
	set_character_facing(i,0);
	move_to_new_town(6,25,45);
}
break;

beginstate 100;
block_entry(1);
break;